class PrinterFactory{
    Printer getPrinter(int v){
    Printer p;
    if ( v == 1 ) {
      p = new HPPrinter();
    }else{
      p = new CannonPrinter();
    };
    return p;
    };
};
